Add support for certificate authentication - #73
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new credential mode (Certificate) to the AzureSSO package so apps can authenticate to Entra ID using a certificate from the local certificate store (useful for scenarios like local development without client secrets).
Changes:
- Introduces
CredentialType.Certificateand new configuration fields (CertificateThumbprint,CertificateStorePath). - Wires certificate-based client credentials into the Microsoft Identity configuration.
- Updates schema + READMEs to document the new credential option.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Umbraco.Community.AzureSSO/Settings/AzureSSOSettings.cs | Exposes certificate settings via the settings wrapper. |
| src/Umbraco.Community.AzureSSO/MicrosoftAccountAuthenticationExtensions.cs | Adds certificate credential mapping into Microsoft Identity options. |
| src/Umbraco.Community.AzureSSO/CredentialType.cs | Adds new enum value Certificate. |
| src/Umbraco.Community.AzureSSO/AzureSSOConfiguration.cs | Adds certificate config properties and validation. |
| src/Umbraco.Community.AzureSSO/appsettings-schema.UmbracoCommunityAzureSSO.json | Documents certificate settings + expands enum values in schema. |
| README.md | Documents certificate mode and updates credential-type guidance. |
| README-v15plus.md | Updates text noting client secret not required when using certificate. |
| README-v14plus.md | Updates text noting client secret not required when using certificate. |
| README-v13.md | Updates text noting client secret not required when using certificate. |
| README-uptov12.md | Updates text noting client secret not required when using certificate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+142
to
+152
| case CredentialType.Certificate: | ||
| options.ClientCredentials = new[] | ||
| { | ||
| new CredentialDescription | ||
| { | ||
| SourceType = CredentialSource.StoreWithThumbprint, | ||
| CertificateStorePath = string.IsNullOrEmpty(settings.CertificateStorePath) ? "CurrentUser/My" : settings.CertificateStorePath, | ||
| CertificateThumbprint = settings.CertificateThumbprint, | ||
| } | ||
| }; | ||
| break; |
Comment on lines
107
to
109
| (CredentialType != CredentialType.Secret || !string.IsNullOrEmpty(ClientSecret)) && | ||
| (CredentialType != CredentialType.Certificate || !string.IsNullOrEmpty(CertificateThumbprint)) && | ||
| !string.IsNullOrEmpty(CallbackPath) && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Add another option for auth: certificates
Mainly to allow local development without needing client secrets
Checklist before requesting a review